from bot import Bot
from bots_common import *


class Bot_Biggest(Bot):
	def __init__(self, *args, **kwargs):
		super().__init__(*args, **kwargs)
		self.name = 'Biggest'

	def bot_give_card(self, msg):
		# print('about to give card')
		hand = msg.get('hand')
		# print(hand, '->', max(hand))
		msg = self.give_card(max(hand))
		self.send_msg(msg)
		return max(hand)

	def bot_select_row(self, msg):
		# print('about to select row')
		rows = msg.get("rows")
		index = lowest_penalty_row_index(rows)[0]
		answer = self.choose_row(index)
		self.send_msg(answer)
